<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }
        body {
            background-color: green;
        }
        .whiteBear {
            width: 200px;
            height: 100px; 
            margin: 100px auto;
            background: url(./老胡来也_23级H5CSS3练习_files/bear.png) left; 
            animation: BearRun 1s steps(8) infinite; 
            display: inline-block;
        }
        .box {
            width: 200px;
            height: 100px;
            animation: boxRun 20s linear infinite;
           
        }
        @keyframes BearRun {
            0% {
                background-position: 1600px;
            }
            100% {
                background-position: 0px;
            }
        }
        @keyframes boxRun {
            0% {
                transform: translateX(-100px);
            }
            100% {
                transform: translateX(1500px);
            }
        }
    </style>
</head>
<body>
    <div class="box">
        <div class="whiteBear"></div>
    </div>
</body>
</html>